//
//  UIImage+Extension.m
//  dierzu_10_30
//
//  Created by lanou3g on 15/10/31.
//  Copyright © 2015年 仝肖月. All rights reserved.
//

#import "UIImage+Extension.h"

@implementation UIImage (Extension)
//根据图片名返回一张能够自由拉伸的图片
+(UIImage *)resizedImage:(NSString *)name
{
    UIImage *image = [UIImage imageNamed:name];
    //保护的区域,也就是image的左侧和上面都保护一般的位置
    return [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
}
@end
